package battle.cmd
{
	import battle.BaseObject;
	
	import battle.cmd.IExecutor;
	
	import battle.Character;
	
	public class TurnLeft extends AbstractCharacterExecutor
	{
		public function TurnLeft()
		{
		}
		
		public function execute(context:*, target:BaseObject):void
		{
			super( context, target );

			var character:Character = Character( target );
			
			context = character.direction;
			
			character.turn( Character.DIRECTION_LEFT );
			
		}
		
		public function undo(context:*, target:BaseObject):void
		{
			super( context, target );
			
			var character:Character = Character( target );
			
			character.turn( int( context ) );
		}
	}
}